﻿@model Testicide.Models.Project

@{
    ViewBag.Title = "Project";
}

@using (Html.BeginForm("AddEditRecord", "Project")) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)

    <div class="order">
        <fieldset>
            <legend></legend>
            @if (ViewBag.IsUpdate == true)
            {
                @Html.HiddenFor(model => model.ID)
            }
            <div class="editor-label">
                @Html.LabelFor(model => model.Name)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Url)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Url)
                @Html.ValidationMessageFor(model => model.Url)
            </div>
            <br />
            <p>
                @if (ViewBag.IsUpdate == false)
                {
                    <br />
                    <input type="submit" value="Save" id="btnSave" name="cmd" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
                }
                else
                {
                    <div class="editor-label">
                        @Html.LabelFor(model => model.Date)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.Date)
                        @Html.ValidationMessageFor(model => model.Date)
                    </div>
                    <br />
                    <input type="submit" value="Update" id="btnUpdate" name="cmd" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
                }
                <input type="button" value="Cancel" id="btncancel" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
            </p>
        </fieldset>
        
    </div>

}